#include "widget.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //全局样式

    QString style ="QPushButton {color :red ;} ";
    //伪类选择器
    style += "QPushButton:hover {color :green ;} ";  //按钮没有按下时的颜色
     style += "QPushButton:pressed {color :blue ;} ";//按钮按下时的颜色
    a.setStyleSheet(style) ;

    Widget w;
    w.show();
    return a.exec();
}
